<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ page isELIgnored="true" %>
<%@ page import = "java.util.*" %>
<%@ page import = "worklog.dto.*" %>
<jsp:useBean id="user" scope="session" class="worklog.db.UserDB"/>
<%
	Object isLoggedObj = session.getAttribute("logged");
	Boolean isLogged = false;
	if (isLoggedObj != null) isLogged = (Boolean) isLoggedObj;
	if (!isLogged) response.sendRedirect("login.jsp");
%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Worklog3</title>
<link rel="stylesheet" type="text/css" href="themes/aristo/jquery-ui-1.8.7.custom.css">
<link rel="stylesheet" type="text/css" href="css/jquery.toChecklist.css">
<link rel="stylesheet" type="text/css" href="css/widgets.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body class="user-stats">
	<jsp:include page = "menu.jsp" />

	<aside id="sidebar">
		
		<div class="calendar-nav">
			<label class="user-label">Users</label>
			<select id="userSelect" size="15" multiple>
			<%
				ArrayList<UserDTO> list = user.getUsers();
				if (list != null && list.size() > 0) 
					for (UserDTO usr : list){
						out.println("<option value=\"" + usr.getId() + "\">" + usr.getLogin() + "</option>");
					}
			%>
			</select>
		</div>
		
	</aside>

	<section id="wrapper"><div id="chart1"></div><div id="chart2"></div></section>


<script src="js/jquery/jquery-1.7.2.min.js"></script>
<script src="js/jquery/jquery-ui-1.8.14.custom.min.js"></script>
<script src="js/jquery/jquery.toChecklist.js"></script>
<script src="js/jquery/jquery.plugins.js"></script>
<script src="js/jquery/highcharts.js"></script>
<script src="js/jquery/highstock.js"></script>

<script src="js/_toolbox.js"></script>
<script src="js/widgets/mask.js"></script>
<script src="js/widgets/toaster.js"></script>
<script src="js/widgets/window.js"></script>
<script src="js/common.js"></script>
<script src="js/user-stats.js"></script>
<script>App.User=<%
Object userO = session.getAttribute("userId");
if (userO != null) out.print(user.getUserById((Integer)userO).toString()); else out.print("{}");
%>;</script>
</body>
</html>